import DAO.BaseDAO;
import DAO.MetricDaoImp;
import DAO.MetricaDA;
import java.lang.reflect.Field;
import java.util.Collection;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.*;
import javax.faces.convert.ConverterException;
import javax.faces.convert.FacesConverter;

@FacesConverter("selectOneUsingObjectConverter")
public class Converter {
    

	public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException {
		if(value != null) {
                    MetricDaoImp m = new MetricDaoImp();
			return m.getMetrica(Integer.parseInt(value));
		}
		return null;
	}

}
